package com.gs.mybatisflextest.controller;


import com.gs.mybatisflextest.service.TbUserService;
import com.gs.mybatisflextest.vo.UserVo;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Path;
import org.noear.solon.core.handle.Result;

@Controller
@Mapping("/user")
public class UserInfoController {


    @Inject
    private TbUserService tbUserService;


    @Mapping("/getInfo/{id}")
    public Result  queryUserInfo(@Path("id") String id){

        UserVo tbUser = tbUserService.queryUserVoUserId(id);

        return Result.failure(0,"查询用户信息成功！",tbUser);
    }


}
